from random import random

import requests


headers = {
  'authority': 'work.weixin.qq.com',
  'accept': 'application/json, text/javascript, */*; q=0.01',
  'x-requested-with': 'XMLHttpRequest',
  'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36',
  'content-type': 'application/x-www-form-urlencoded',
  'sec-fetch-site': 'same-origin',
  'sec-fetch-mode': 'cors',
  'sec-fetch-dest': 'empty',
  'referer': 'https://work.weixin.qq.com/wework_admin/frame',
  'accept-language': 'zh-CN,zh;q=0.9',
  'cookie': 'RK=GGi4TFofXv; ptcz=ed7596349d9abdb7acd2a08579b152f7bea7e8a2b010b9482ca8e174bbcbea4b; pgv_pvid=4590865652; wwrtx.c_gdpr=0; worknote_upgradeFlag1688851379198264=; qq_openid=35936AD63D30336DB3F1552AFD0B2B72; qq_access_token=AE896C4B3FF4EB81AED38A04D02DD4E0; qq_client_id=101487368; pac_uid=3_35936AD63D30336DB3F1552AFD0B2B72; xw_main_login=qq; tvfe_boss_uuid=c4303f2569135296; pt_sms_phone=189******53; Hm_lvt_9364e629af24cb52acc78b43e8c9f77d=1620187293,1620523423; iip=0; ptui_loginuin=179049114; open_id=35936AD63D30336DB3F1552AFD0B2B72; wwrtx.ref=direct; wwrtx.refid=01226365; wwrtx.ltype=1; wwrtx.cs_ind=; ww_rtkey=pcodf4; wwrtx.vid=1688851379198264; wxpay.corpid=1970325131445067; wxpay.vid=1688851379198264; wwrtx.vst=l6Q2lrlHklmlBCjvfSSs6TetFw4wKukH6CKfpOF_gQQuetFFTCa_lAw7PKjjb8CF-2_6DWpywYMbxHG9qTQ1xiugEWD6a5bxezspU7TT9yW455h-9xN2Acn0ECtB8hHT4vbtN7oliBDBo7NeARO0lNpv82EU2Eh0i92Gf5t7tPlSrAHsSm8sktqCEfJnJXnCR0D0oc8sXXk5dSJLIajHqWClGl1HOiZC0mI_hq6M0OP6JWx5nkm2L5zDKK6czk6VYNzEHyctPtiYrIgblKRajQ; wwrtx.d2st=a5838340; wwrtx.sid=8tV4XZLZFAtR-PfSlLv-3aQl2P-NBK-3ZH3pkzuuY4aAfvbbIHbB8oIyZtgSbeqY; wwrtx.i18n_lan=zh'
}

while True:
  data ={'lang': 'zh_CN','f': 'json','ajax': 1,'timeZoneInfo[zone_offset]': '-8',
         'random': random(),'off_set': 0,'limit': 10,'create_ts_begin': 1617292800,'create_ts_end': 2538014249,'page': 1,
  'accurate_keywords':'','_d2st': 'a9051282'}
  url = "https://work.weixin.qq.com/wework_admin/customer/getGroupChatList"
  response = requests.request("GET", url, headers=headers, params=data)
  json1 = response.json()
  list = {}


print(response.text)